home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Win2K AddRem Soft 1.xpl < prev    next >
Text File  |  2004-04-28  |  3KB  |  105 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="9"
  3. "COUNT"="2"
  4. "UIPATH"="System\Software Installation\Add or Remove Programs"
  5. "NAME"="Add or Remove Programs Options (User)"
  6. "VERSION"="1.03"
  7. "OSVERSION"="0001011"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Enable Logging"
  10. "TEXT 2"="Disable Logging"
  11. "DESCRIPTION 1"="The "Add/Remove Programs" applet inside the control panel can be configured as you wish by using the options here."
  12. "DESCRIPTION 2"="By default, all options are available but you might decide to disable some of the items listed here."
  13. "AUTHOR"="Xteq Systems"
  14. "CONTACTURL"="http://www.xteq.com"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"="Thanks to CptSiskoX [cptsiskox@hotmail.com] for the idea!"
  17.  
  18. 'Declaration of some constants
  19. sPath="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\"
  20. sV1="NoAddRemovePrograms" 'Disable Add/Remove Programs
  21. sV2="NoRemovePage" 'Disable Change and Remove Programs
  22. sV3="NoAddPage"  'Disable Add Programs
  23. sV4="NoWindowsSetupPage"  '- Disable Windows Components Wizard
  24. sV5="NoAddFromCDorFloppy" ' - Hide "Add a program from CD-ROM or disk" option
  25. sV6="NoAddFromInternet" ' - Hide "Add programs from Microsoft" option
  26. sV7="NoAddFromNetwork"  ' - Hide "Add programs from your network" option
  27. sV8="NoChooseProgramsPage"  'show choose programs
  28. sV9="NoSupportInfo" ' - Disable Support Information
  29.  
  30.  
  31.  
  32. 'Called when the Plugin is started
  33. SUB Plugin_Initialize
  34.  Call SetUIElement(1,"*Enable Add/Remove Programs applet*")
  35.  Call ReadIt(1,sV1)
  36.  
  37.  Call SetUIElement(2,"Show page 'Add or remove programs'")
  38.  Call ReadIt(2,sV2)
  39.  
  40.  Call SetUIElement(3,"Show page 'Add New Programs'")
  41.  Call ReadIt(3,sV3)
  42.  
  43.  Call SetUIElement(4,"Show page 'Add or Remove Windows components'")
  44.  Call ReadIt(4,sV4)
  45.  
  46.  Call SetUIElement(5,"Show 'Add programs from CD or Floppy' command")
  47.  Call ReadIt(5,sV5)
  48.  
  49.  Call SetUIElement(6,"Show 'Add programs from Windows Update' command")
  50.  Call ReadIt(6,sV6)
  51.  
  52.  Call SetUIElement(7,"Show 'Add programs from the network' command")
  53.  Call ReadIt(7,sV7)
  54.  
  55.  Call SetUIElement(8,"Show page 'Choose default programs'")
  56.  Call ReadIt(8,sV8)
  57.  
  58.  Call SetUIElement(9,"Show 'Support Information' link for installed programs")
  59.  Call ReadIt(9,sV9)
  60.  
  61. End Sub
  62.  
  63. Sub ReadIt(itm,val)
  64.  s=RegReadValue(sPath & val)
  65.  if s=0 or IsEmpty(s) then
  66.     Call SetUIElementEx(itm,true)
  67.  else
  68.     Call SetUIElementEx(itm,false)
  69.  end if
  70. End Sub
  71.  
  72.  
  73. 'Called when the Plugin should validate the Data the user has entered
  74. SUB Plugin_CheckData(ElementIndex)
  75. END SUB
  76.  
  77. 'Called when the Plugin should apply the changes
  78. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  79.  Call WriteIt(1,sV1)
  80.  Call WriteIt(2,sV2)
  81.  Call WriteIt(3,sV3)
  82.  Call WriteIt(4,sV4)
  83.  Call WriteIt(5,sV5)
  84.  Call WriteIt(6,sV6)
  85.  Call WriteIt(7,sV7)
  86.  Call WriteIt(8,sV8)
  87.  Call WriteIt(9,sV9)
  88. End Sub
  89.  
  90. Sub WriteIt(itm,val)
  91.  b=GetUIElementEx(itm)
  92.  if b=true then
  93.     if RegValueExists(sPath & val) then
  94.        Call RegDeleteValue(sPath & val)
  95.     end if
  96.  else
  97.     Call RegWriteValue(sPath & val,1,2)
  98.  end if
  99. End Sub
  100.  
  101.  
  102. 'Called when the Plugin is about to be removed from memory
  103. SUB Plugin_Terminate
  104. END SUB
  105.